<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "consignor".
 *
 * @property integer $consignor_id
 * @property integer $user_id
 * @property string $consignor_name
 * @property string $consignor_relation
 * @property string $consignor_mobile
 * @property integer $consignor_sex
 * @property string $consignor_idcard
 * @property string $consignor_wechat_id
 * @property string $consignor_email
 * @property string $consignor_address
 * @property integer $created_at
 * @property integer $updated_at
 */
class Consignor extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'consignor';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'consignor_sex', 'created_at', 'updated_at'], 'integer'],
            [['consignor_name', 'consignor_relation', 'consignor_idcard'], 'string', 'max' => 32],
            [['consignor_mobile'], 'string', 'max' => 11],
            [['consignor_wechat_id', 'consignor_email', 'consignor_address'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'consignor_id' => 'Consignor ID',
            'user_id' => 'User ID',
            'consignor_name' => 'Consignor Name',
            'consignor_relation' => 'Consignor Relation',
            'consignor_mobile' => 'Consignor Mobile',
            'consignor_sex' => 'Consignor Sex',
            'consignor_idcard' => 'Consignor Idcard',
            'consignor_wechat_id' => 'Consignor Wechat ID',
            'consignor_email' => 'Consignor Email',
            'consignor_address' => 'Consignor Address',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
